package com.sky.config;

import com.sky.utils.WeChatPayUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 微信支付配置类  商户退款使用
 */
@Slf4j
@Configuration
public class WeChatPaymentConfig {


    /**
     * 声明微信支付的工具bean
     */
    @Bean
    @ConditionalOnMissingBean
    public WeChatPayUtil weChatPayUtil(){
        log.info(" WeChatPay微信支付工具bean初始化...... ");
        return new WeChatPayUtil();
    }

}